package com.kefu.admin.modules.tgqmdj.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kefu.admin.modules.tgqmdj.mapper.MenuMapper;
import com.kefu.admin.modules.tgqmdj.model.Menu;
import com.kefu.admin.modules.tgqmdj.model.TreeMenu;
import com.kefu.admin.modules.tgqmdj.model.TreeMenuList;
import com.kefu.admin.modules.tgqmdj.service.MenuService;

@Service
public class MenuServiceImpl implements MenuService {
	
	@Autowired
    private MenuMapper menuMapper;

	@Override
	public List<Menu> queryMenu(Integer status) {
		// TODO Auto-generated method stub
		return menuMapper.queryMenu(status);
	}

	@Override
	public List<Menu> queryMenuName(Integer status) {
		// TODO Auto-generated method stub
		return menuMapper.queryMenuName(status);
	}

	@Override
	public List<TreeMenu> queryTreeMenu() {
		// TODO Auto-generated method stub
		return menuMapper.queryTreeMenu();
	}

	@Override
	public int insertMenu(Menu menu) {
		// TODO Auto-generated method stub
		return menuMapper.insertMenu(menu);
	}

	@Override
	public Menu queryMenuById(Long menuId) {
		// TODO Auto-generated method stub
		return menuMapper.queryMenuById(menuId);
	}

	@Override
	public int updataMenuById(Menu menu) {
		// TODO Auto-generated method stub
		return menuMapper.updataMenuById(menu);
	}

	@Override
	public int deleteMenuById(Long menuId) {
		// TODO Auto-generated method stub
		return menuMapper.deleteMenuById(menuId);
	}

	@Override
	public Menu queryMenuIdByMenuName(String menuName) {
		// TODO Auto-generated method stub
		return menuMapper.queryMenuIdByMenuName(menuName);
	}

	@Override
	public List<TreeMenuList> selectMenu() {
		// TODO Auto-generated method stub
		return menuMapper.selectMenu();
	}

}
